package com.baohua.service;

import java.util.List;
import java.util.Set;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baohua.exception.BaohuaSystemException;
import com.baohua.model.Menu;
import com.baohua.model.Role;

/**
 * 角色Service接口
 * @author czp
 *
 */

public interface RoleService {

	/**
	 * 查询所以角色列表
	 * @return
	 */
	public List<Role> queryRole();
	
	/**
	 * 增加角色
	 * @param role
	 * @throws Exception 
	 */
	public void addRole(Role role, String menuNOStr) throws BaohuaSystemException;
	
	/**
	 * 修改角色
	 * @param role
	 * @throws Exception 
	 */
	public void updateRole(Role role, String menuNOStr) throws BaohuaSystemException;
	
	/**
	 * 删除角色
	 * @param role
	 * @throws Exception 
	 */
	public void delRole(int roleId) throws BaohuaSystemException;
	
	/**
	 * 根据roleId查询角色
	 * @param roleId
	 * @return
	 * @throws Exception 
	 */
	public Role queryRoleById(int roleId) throws BaohuaSystemException;
	
	/**
	 * 根据roleId查询角色所对应的菜单树
	 * @param roleId
	 * @return
	 * @throws BaohuaSystemException
	 */
	public Set<Menu> queryMenuByRoleId(int roleId) throws BaohuaSystemException;
	
}
